﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BestLifePOS_Core.Data.Commands;
using BestLifePOS_Core.DomainObjects;

namespace BestLifePOS_Core.Data.Fascade
{
   public class UserDAO
    {

        public static int SaveUser(User PUser)
        {
            BestlifeInsertUserDataAction LvUser = new BestlifeInsertUserDataAction(PUser);
            return LvUser.execute();

        }
        public static string GetNewUser()
        {
            BestLifeGetNewUserDataAction LvGet = new BestLifeGetNewUserDataAction();
            return LvGet.execute();

        }
        public static List<User> GetUserByUsername(string PUser)
        {
            BestLifeUserByUsernameDataAction LvUser = new BestLifeUserByUsernameDataAction(PUser);
            return LvUser.execute();
        }
        public static int UpdateUser(User PUser)
        {
            BestLifeUpdatUserByUsernameDataAction LvUser = new BestLifeUpdatUserByUsernameDataAction(PUser);
            return LvUser.execute();
        }

        public static List<User> Getuserbyuserid(string PUsername, string PPassword)
        {
            BestLifeuserByunamewithcheckpassword LvGetbyuname = new BestLifeuserByunamewithcheckpassword(PUsername, PPassword);
            return LvGetbyuname.execute();
        }
    }
}
